package com.study.singlemode;

public class Student {
    //2、定义并new一个静态变量存储该类的唯一对象
    private static Student student = new Student();
    //1、把类的构造器私有化处理
    private Student(){
    }
    //3、提供一个静态方法返回这个唯一的对象
    public static Student getStudent(){
        return student;
    }
}
